package com.flaskpy.web.eternity.core.api;

import com.flaskpy.web.eternity.core.constant.CommonConstant;
import lombok.Getter;
import lombok.Setter;

/**
 * @className: SuccessData
 * @description: 成功响应
 * @author: flaskpy 代码copy大师
 * @date: 2021/6/10
 **/
public class SuccessResponse<T> extends  ResponseData<T> {
    @Getter
    @Setter
    private PageInfo pageInfo;
    public SuccessResponse(T data){
        this.setData(data);
        this.setMsg(CommonConstant.SUCESS_MSG);
        this.setCode(CommonConstant.SUCESS_CODE);
    }
    public SuccessResponse(){
        this.setMsg(CommonConstant.SUCESS_MSG);
        this.setCode(CommonConstant.SUCESS_CODE);
    }
}
